package 课堂作业api_day3;

import java.util.Arrays;

//2.对字符串“张三@@@李四@@王五@茅台”进行切割，去掉@符号。
public class TestDemo4 {
    public static void main(String[] args) {
        String str = "张三@@@李四@@王五@茅台";
        //\@{1,}
        String regex ="\\@{1,}";
        String[] split = str.split(regex);
        for (String s:split){
            System.out.println(s);
        }
        System.out.println(Arrays.toString(split));
    }
}
